#include "stdafx.h"
#include <boost/test/auto_unit_test.hpp>
#include "bmock.hpp"

struct test_exact_mocks:public bmock::test_mode_control{
	test_exact_mocks():test_mode_control(bmock::location("",0),bmock::control_tools_ptr(new bmock::test_control_tools())){
		instances_.push(this);
	}
	std::vector<std::string> get_exact_mocks(){
		return exact_mocks_;
	}
	void check(const bmock::func_spec &,const bmock::arg_list &){}
	void return_void(const bmock::location &){};
	bool function_mock_defined(std::string ){return true;}
	bool mock_defined(const bmock::func_spec &){return true;}
	void change_state(){}

};

struct exact_mock_test{};

BMOCK_TEST(exact_mock_test,test_create_exact_mock_new_mocks)
{
	test_exact_mocks I;
	
	std::vector<std::string> expected;
	expected.push_back("void f(int a,int b)");
	expected.push_back("void f()");
	expected.push_back("int k()");

	BMOCK_CREATE_MOCK("void f(int a,int b)");
	BMOCK_CREATE_MOCK("void f()");
	BMOCK_CREATE_MOCK("int k()");
	BOOST_CHECK(I.get_exact_mocks()==expected);
}